CAN BUS ANALYSER
Overview
The CAN Bus Analyser is a virtual instrument for monitoring, decoding, stimulating and stress-testing a Controller Area Network bus inside a running simulation. It is the equivalent of a benchtop CAN analyser, and it serves three roles at once: a passive monitor that captures and decodes every frame on the wire, an active node that can transmit your own frames, and a fault generator that can drive a chosen node towards bus-off. Because the database, the decode, the stimulus and the fault injection all live in one window, it is the natural single point of reference when debugging firmware or teaching in-vehicle networking.
The instrument connects to the bus through two pins, CANH and CANL, which you wire to the same pair every other node shares. Set its DATABASE property to a .dbc file and the analyser decodes the traffic by name. When the simulation runs, the analyser window opens automatically; if it does not appear, or if you have closed it, it can be reopened from the Debug menu.
The window is organised as seven tabs. The Frames tab carries a toolbar for controlling capture, filtering and export.
| Tab | Purpose |
| Frames | The live capture list, with a bit-level ribbon of the selected frame. |
| Signals | Every DBC signal decoded to engineering units, with live value, range and age. |
| State | A live snapshot of the bus, one row per message with its latest data, cycle time and age. |
| DBC | A browser for the loaded signal database: nodes, messages and signal layout. |
| Monitor | Bus load, frame rate and the per-node error counters, error total and state. |
| Send | Compose and transmit frames by hand or from a script. |
| Inject | Synthesise CAN errors to exercise a node's fault handling and recovery. |
Without a DATABASE the analyser still captures, times and displays every frame as raw hexadecimal. The Signals and DBC tabs, and the decoded names in the Frames tab, become available only once a .dbc file is loaded.
Monitoring a heavily loaded bus carries a simulation performance cost, since every frame is captured and decoded. The capture list is bounded at twenty thousand frames; once full, the oldest frames are discarded in blocks. Use the Clear button to reset the list at the start of a run of interest.
The Toolbar
The toolbar sits at the top of the Frames tab, since it acts on the capture list. It controls capture, export and filtering, and reports the running frame and error counts.
Pause
Suspends capture. Frames continue to cross the simulated bus and are delivered to the nodes, but they are not added to the capture list while Pause is engaged. Release it to resume capturing. This is useful for freezing the display so you can study what has already been captured.
Clear
Empties the capture list and resets the frame count to zero. The signal observations on the Signals tab are cleared at the same time.
Save Trace
Writes the captured frames to a trace file for offline analysis in third-party tools. Three formats are offered, selected by the file extension you choose:
| Format | Description |
|
.asc |
Vector ASCII trace, a human-readable text log of timestamped frames. |
|
.blf |
Vector Binary Logging Format, a compact binary log for large captures. |
|
.trc |
PEAK PCAN-View trace, a widely supported text trace format. |
A trace can also be written continuously during the simulation by setting the LOGFILE property on the part. The format follows the extension you give, exactly as for Save Trace.
Filter ID
Restricts the Frames list to identifiers matching the text you enter. The match is a wildcard against the displayed (hexadecimal) identifier, so 1A* shows every frame whose identifier begins with 1A. The filter is not case sensitive. Clear the box to show all frames again. Filtering affects only the display; captured frames are retained and are still written by Save Trace.
Frames
A running total of the frames captured since the last Clear. It continues to count while individual tabs are open and reflects the true capture total, not the number currently shown by the filter.
Errors
A running total of the captured frames carrying an error status, shown alongside the frame count.
Errors only
When ticked, the list shows only frames flagged with an error, so an injected fault or a corrupted frame is easy to find without scrolling. Untick it to show all traffic again.
Frames Tab

The Frames tab, showing the bit ribbon for the selected frame above the live capture list.
The Frames tab is the primary view. It combines a scrolling list of captured frames with a bit-level ribbon of whichever frame is selected, in the manner of a packet list and packet detail in a network analyser.
The Capture List
Each row is one frame, in capture order, except for an occasional node lifecycle event row (see below). The columns are described below.
| Column | Meaning |
|
# |
The capture sequence number, in order of arrival. |
| Time | The simulation time of capture, in seconds to microsecond resolution. |
| Node | The transmitting node, shown by its schematic reference (for example U2). |
| ID | The frame identifier in hexadecimal: three digits for a standard (11-bit) identifier, eight for an extended (29-bit) identifier. |
| Type | The frame format: Std, Ext, FD Std or FD Ext. |
| RTR | Marked when the frame is a remote transmission request rather than a data frame. |
| DLC | The data length code, which gives the number of data bytes (up to 64 for CAN FD). |
| Data | The payload bytes in hexadecimal. |
| CRC | The frame's cyclic redundancy check value in hexadecimal. |
| Status | The outcome of the frame. OK is shown in green for a frame that completed normally, Arb Lost in amber where the node lost arbitration, and an error in red. An injected error shows its kind here, such as Bit Err or CRC Err. |
| Decoded | A summary of the named signal values, when a DBC database is loaded. |
The list follows the newest frame automatically while the last row is selected. Click any earlier row to hold the view there and study a frame; the ribbon then shows that frame and stops following the live tail. Click the bottom row again to resume following.
Node Lifecycle Events
Alongside captured frames, the list carries an occasional event row when a node's bus-off state changes: one when it latches (for example BUS OFF (TEC=256)) and another when it clears (recovered (TEC/REC reset)), each attributed to the node and timestamped like any other row. An event row carries no frame of its own, so selecting it clears the bit ribbon, and it is skipped by Save Trace and LOGFILE, which have no CAN frame to log for it.
The Bit Ribbon
The ribbon at the top decomposes the selected frame into its protocol fields, drawn left to right exactly as they appear on the wire: start of frame, identifier, the control bits, the data length code, the data field, the CRC, the acknowledge slot and the end of frame. Each field is a coloured block with its name above, the individual bit values below, and the decoded hexadecimal or decimal value beneath that. The identifier and CRC are split nibble by nibble so each hexadecimal digit aligns with its four bits, and each data byte is annotated with its value.
Stuff bits, which the protocol inserts after five consecutive bits of the same value to maintain synchronisation, are shown in their own colour so you can see where they fall. A logic 0 is dominant and a logic 1 is recessive.
Hover over any bit to see a tooltip naming the field, giving the bit value as dominant or recessive, its position within the field and its index in the bit stream. Hold CTRL and roll the mouse wheel to zoom the ribbon wider or narrower; a long CAN FD frame can then be scrolled horizontally.
When the selected frame carries an injected error, the ribbon highlights it in red according to the error's kind: a bit or stuff error ticks the affected bit, while a CRC, form or acknowledge error shades the whole field it corrupts. A frame with no injected error shows no marker, so the highlight always belongs to the frame you have selected.
Signals Tab

The Signals tab, listing every signal in the loaded database with its live decoded value.
The Signals tab presents the bus as engineering values rather than raw bytes. Every signal defined in the loaded DBC is listed, one per row. A signal is shown greyed until its message is first seen on the bus, then becomes active and updates live as each frame arrives.
| Column | Meaning |
| Message | The parent message name and identifier. |
| Signal | The signal name from the database. |
| Unit | The engineering unit, where the database defines one. |
| Value | The most recently decoded value. Where the database defines a value table, the named state is shown rather than the raw number. |
| Min, Max | The lowest and highest values observed since capture began, useful for catching transients. |
| Age | The time since the signal was last updated, shown in milliseconds, seconds or minutes. A stale age reveals a message that has stopped transmitting. |
| Count | The number of times the signal has been seen. |
| DBC Range | The minimum and maximum the database declares for the signal, for comparison against the observed values. |
Click a column heading to sort. Sorting by Age brings the freshest, or the most stale, signals to the top, which is an effective way to find a message that has dropped off the bus.
State Tab

The State tab, one row per message, showing each message's latest data, how often it arrives and how long since it was last seen.
The State tab is a live snapshot of the bus rather than a running log. Where the Frames tab lists every frame as it arrives, the State tab keeps a single row per message identifier and updates it in place, so it answers the question “what is on the bus right now, and is anything missing?” at a glance.
| Column | Meaning |
| ID | The message identifier in hexadecimal. |
| Name | The message name from the loaded database, where one is loaded. |
| Node | The transmitting node's schematic reference. |
| DLC | The data length code. |
| Data | The most recent payload bytes in hexadecimal. |
| Decoded | The most recent signal values decoded by name, when a database is loaded. |
| Period | The time between the last two arrivals of this message, its observed cycle time. |
| Count | The number of times the message has been seen. |
| Age | The time since the message last arrived. A message that stops is flagged SILENT, so a dead or muted node stands out at once. |
Rows appear in the order each message is first seen and are not sorted. The SILENT flag makes the State tab the quickest way to spot a node that has dropped off the bus, one you have muted, for example, or driven to bus-off.
DBC Tab

The DBC tab, browsing the nodes and messages defined in the loaded signal database.
The DBC tab is a browser for the loaded signal database. A DBC file is the Vector database format, the de-facto industry standard for describing the messages and signals carried on a CAN bus; you point the DATABASE property at an existing file rather than author one here. The tab lets you read the network definition the analyser is decoding against, without leaving the simulation. A summary line at the top reports the number of nodes and messages, or prompts you to set the DATABASE property if none is loaded.
Nodes
The Nodes branch lists every node (ECU) named in the database. Expanding a node shows the messages it sends and the signals it receives, so you can read the network from the point of view of any one participant.
Messages
The Messages branch lists every message, each showing its identifier, name, data length code, transmitting node and signal count. Expanding a message reveals its signals, each summarised with its start bit, length, signedness, byte order, scaling factor, offset and unit. Where a signal has a value table, the named states are listed beneath it. Hover over a signal for a full description, including its receivers and any comment from the database.
Compose in Send pane
With a message selected, this button pre-fills the Send tab with that message's identifier, type and data length, with the data bytes zeroed, and switches to the Send tab. It is the quickest way to start transmitting a known message: select it here, compose, then edit the bytes and send.
Monitor Tab

The Monitor tab, showing overall bus load and the error state of each node.
The Monitor tab reports the health of the bus as a whole and of each node on it. The two large figures at the top give the bus load as a percentage of capacity and the current frame rate in frames per second, both updated continuously.
The table below has one row per node.
| Column | Meaning |
| Node | The node identifier, with its schematic reference where the controller has registered one. |
| TEC | The transmit error counter. |
| REC | The receive error counter. |
| Errors | A cumulative count of injected faults on this node. Unlike TEC and REC, which decay by one on every good frame, this never resets, so it records every error even after the counters have recovered. |
| State | The error state of the node: Active in green, Passive in amber, or Bus-off in red. |
| Arb Lost | The number of times the node has lost arbitration to a higher-priority frame. A low-priority node loses often; the highest-priority node rarely does. |
These counters follow the CAN specification. A node begins error-active. When either counter reaches 128 it becomes error-passive, and when the transmit error counter reaches 256 the node goes bus-off and stops transmitting. Watching the counters climb and the state change is the clearest way to see CAN's fault-confinement mechanism at work, and it pairs directly with the Inject tab.
TEC and REC decay by one on every successful frame, so a node under a slow trickle of injected errors can settle just below the bus-off threshold. Pause the simulation before injecting and the counters hold, so a burst of errors reaches bus-off cleanly and repeatably. The Errors column records the faults either way.
Send Tab

The Send tab, with the frame composer, the live bit-ribbon preview and the activity log.
The Send tab makes the analyser an active node. You can compose a single frame, transmit it once or periodically, or load a script of frames to play onto the bus. Frames you send participate in arbitration like any real node.
Composing a frame
The composer row sets the frame to transmit.
Type
The frame format: Std (CAN 2.0A) for a standard 11-bit frame, Ext (CAN 2.0B) for an extended 29-bit frame, and FD Std or FD Ext for the CAN FD equivalents.
ID
The frame identifier, entered in hexadecimal (for example 0x123).
DLC
The data length code. Values 0 to 8 map to that many bytes; for CAN FD, values 9 to 15 select the larger payloads up to 64 bytes.
Data (hex bytes)
The payload, entered as space-separated hexadecimal bytes (for example DE AD BE EF). The number of bytes must match the length selected by the DLC.
Send
Transmits the composed frame once.
Repeat every
When selected, the composed frame is transmitted repeatedly at the interval set alongside, in milliseconds. This is the simplest way to put periodic traffic on the bus, for example a simulated sensor broadcast.
Load Script
Loads a text file of frames and plays them onto the bus, each on its own schedule. A frame with no interval is sent once; a frame with an interval repeats. Use this to reproduce a realistic mix of periodic and event-driven traffic. The script syntax is given below.
Stop All
Stops every repeating transmission, whether started by Repeat every or by a loaded script.
Live preview
As you edit the composer, the ribbon below previews the frame bit by bit, using the same field colours as the Frames tab and showing where stuff bits will be inserted. A summary line reports the unstuffed bit count and an estimate of the time the frame occupies the bus. When the composer is incomplete or invalid, the preview prompts you for a valid frame. The log at the bottom records each transmission and reports any composer errors.
Script syntax
A script is a plain text file with one frame per line. Blank lines are ignored and a # begins a comment to the end of the line. Each frame line follows this pattern:
[flags] <id> <dlc> <byte ...> [@ <interval>]
| Element | Description |
|
flags |
Optional. E marks an extended (29-bit) frame and F marks a CAN FD frame. They may be combined, so EF is an extended FD frame. Omit for a standard classical frame. |
|
id |
The identifier in hexadecimal, with an optional 0x prefix. A standard identifier must not exceed 0x7FF; an extended identifier must not exceed 0x1FFFFFFF. |
|
dlc |
The data length code, a decimal value from 0 to 15. |
|
byte ... |
The payload as hexadecimal bytes. The count must match the length selected by the DLC. |
|
@ interval |
Optional repeat period, such as 10ms, 5s or 1m. Omit it to send the frame once. |
For example, the line below transmits an eight-byte frame on identifier 0x100 every 100 milliseconds:
0x100 8 DE AD BE EF 00 00 00 00 @ 100ms
A faulty line is reported in the log and skipped; the rest of the script still loads. If a standard identifier exceeds 0x7FF, the log reminds you to add the E flag.
Inject Tab

The Inject tab, used to synthesise CAN errors against a chosen node.
The Inject tab lets you provoke the CAN error-handling machinery on demand, so a node's fault tolerance and recovery can be tested without physically corrupting a bus. Injecting an error applies the consequence the CAN specification defines: it advances the chosen node's error counters by the correct amount, and flags the next matching frame in the Frames list, where the ribbon highlights it. The effect is visible on the Monitor tab as the counters climb and the state changes.
Victim node
The node whose error counters the injection bumps. The list shows every controller registered on the bus. The analyser's own passive observer is not listed, since injecting errors into it would have no effect.
Error type
Which CAN error to synthesise. The counter change each one causes is shown in brackets and follows the specification: errors a transmitter detects raise the transmit error counter, while errors a receiver detects raise the receive error counter.
| Error type | Effect |
|
BIT |
A bit error, detected by the transmitter. Raises the transmit error counter by 8. |
|
STUFF |
A stuff error, detected by a receiver. Raises the receive error counter by 1. |
|
FORM |
A form error, detected by a receiver. Raises the receive error counter by 1. |
|
CRC |
A CRC error, detected by a receiver. Raises the receive error counter by 1. |
|
ACK |
An acknowledge error, detected by the transmitter. Raises the transmit error counter by 8. |
Bit position
Shown only for a bit error. The bit at which the error is recorded; the Frames ribbon ticks this bit on the flagged frame, so a student can see where it landed. It does not affect the counter arithmetic. You can set it directly by clicking a cell in the Bit key grid below.
Bit key
Shown only for a bit error. A grid of the target message's layout, one row per byte and one column per bit, with each cell naming the signal that owns that bit (read from the loaded database). Click a cell to set the Bit position to that bit, so you can target a meaningful part of the payload rather than counting bits by hand.
Target CAN ID
The message the error is applied to. Choose one from the drop-down, which lists the messages in the loaded database by name and the identifiers currently live on the bus, or type any hexadecimal identifier. The next frame of that identifier is flagged with the error and highlighted on the ribbon; use 0 for the next frame of any identifier.
Repeat count
Applies the injection this many times in one click. Combined with a BIT error, this is how a node is driven to bus-off: each BIT error adds 8 to the transmit error counter, so 32 of them take it from 0 to 256.
Inject
Applies the configured injection to the selected victim node, the chosen number of times. Each injection is recorded in the log beneath.
Preset scenarios
Three buttons apply common teaching scenarios in one click.
Drive victim to bus-off
Applies 32 BIT errors to the victim, taking its transmit error counter from 0 to 256 and forcing it bus-off. Watch the transition on the Monitor tab. Pause the simulation before applying it for a clean, repeatable result, since a running bus lets the counter decay between injections.
Single stuff error
Applies one STUFF error, raising the victim's receive error counter by 1. Useful for showing a single, recoverable fault.
ACK error on victim
Applies one ACK error, raising the victim's transmit error counter by 8.
The injector models the counter consequence of an error and flags the affected frame; it does not alter the bytes of a frame already on the wire. This keeps the educational scenarios reproducible and the resulting node behaviour faithful to the specification.
Model Properties
The analyser is configured through the properties below, accessible from the Edit Component dialogue (right click the part to highlight it, then left click to edit). The part connects to the bus through its CANH and CANL pins.
| Property | Description |
|
DATABASE |
The path to a .dbc signal database. When set, the analyser decodes traffic by name and populates the Signals and DBC tabs. Leave blank to capture raw frames only. |
|
LOGFILE |
The path to a trace file written continuously during the simulation. The format follows the extension: .asc, .blf or .trc, with ASC assumed otherwise. Leave blank for no log. |
|
BAUDRATE |
The nominal bit rate of the bus. The default is 500 kbps. This property is not shown in the library by default; add it only if you need to override the default. |
|
FD_BAUDRATE |
The CAN FD data-phase bit rate. The default is 2 Mbps. As with BAUDRATE, add it only to override the default. |
Whether a node appears as Error Passive or Bus-off, and whether CAN FD frames are present, depends on the controllers wired to the bus. The analyser reflects the real bus behaviour; it does not impose it.
See Also: